<?php
/**
 * Created by PhpStorm.
 * User: FeiFan
 * Date: 2017/11/29
 * Time: 11:03
 */
namespace Home\Controller;
use Think\Controller;
use Home\Model\ImagesModel;
class BaseController extends Controller
{
    /**
     * 验证手机号是否正确
     */
    function isMobile($mobile) {
        if (!is_numeric($mobile)) {
            return false;
        }
        return preg_match('#^13[\d]{9}$|^14[5,7]{1}\d{8}$|^15[^4]{1}\d{8}$|^17[0,6,7,8]{1}\d{8}$|^18[\d]{9}$#', $mobile) ? true : false;
    }
}